package org.example.curriculum_design_6_16.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 知识产权评分规则表
 * @TableName ip_scoring_rule
 */
@TableName(value ="ip_scoring_rule")
@Data
public class IpScoringRule implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 知识产权类型
     */
    private Object ipType;

    /**
     * 知识产权状态
     */
    private Object status;

    /**
     * 得分值
     */
    private Double score;

    /**
     * 规则描述
     */
    private String description;

    /**
     * 规则生效日期
     */
    private Date effectiveDate;

    /**
     * 是否激活
     */
    private Integer isActive;

    /**
     * 每年最多计算次数(NULL表示不限制)
     */
    private Integer maxTimesPerYear;

    /**
     * 团队负责人额外加分
     */
    private Double teamLeaderBonus;

    /**
     * 团队成员额外加分
     */
    private Double teamMemberBonus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        IpScoringRule other = (IpScoringRule) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getIpType() == null ? other.getIpType() == null : this.getIpType().equals(other.getIpType()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getEffectiveDate() == null ? other.getEffectiveDate() == null : this.getEffectiveDate().equals(other.getEffectiveDate()))
            && (this.getIsActive() == null ? other.getIsActive() == null : this.getIsActive().equals(other.getIsActive()))
            && (this.getMaxTimesPerYear() == null ? other.getMaxTimesPerYear() == null : this.getMaxTimesPerYear().equals(other.getMaxTimesPerYear()))
            && (this.getTeamLeaderBonus() == null ? other.getTeamLeaderBonus() == null : this.getTeamLeaderBonus().equals(other.getTeamLeaderBonus()))
            && (this.getTeamMemberBonus() == null ? other.getTeamMemberBonus() == null : this.getTeamMemberBonus().equals(other.getTeamMemberBonus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getIpType() == null) ? 0 : getIpType().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getEffectiveDate() == null) ? 0 : getEffectiveDate().hashCode());
        result = prime * result + ((getIsActive() == null) ? 0 : getIsActive().hashCode());
        result = prime * result + ((getMaxTimesPerYear() == null) ? 0 : getMaxTimesPerYear().hashCode());
        result = prime * result + ((getTeamLeaderBonus() == null) ? 0 : getTeamLeaderBonus().hashCode());
        result = prime * result + ((getTeamMemberBonus() == null) ? 0 : getTeamMemberBonus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", ipType=").append(ipType);
        sb.append(", status=").append(status);
        sb.append(", score=").append(score);
        sb.append(", description=").append(description);
        sb.append(", effectiveDate=").append(effectiveDate);
        sb.append(", isActive=").append(isActive);
        sb.append(", maxTimesPerYear=").append(maxTimesPerYear);
        sb.append(", teamLeaderBonus=").append(teamLeaderBonus);
        sb.append(", teamMemberBonus=").append(teamMemberBonus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}